package cn.openea.perpartner.growth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.openea.perpartner.growth.entity.GrowthConfig;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * (GrowthConfig)表数据库访问层
 *
 * @author makejava
 * @since 2022-08-09 11:12:58
 */
@Repository
public interface GrowthConfigMapper extends BaseMapper<GrowthConfig> {
    @Select("select grade,score,subject from growth_config where  convert(score,signed) <=#{score} order by convert(score,signed) desc limit 1")
    GrowthConfig selectNextGrade(String score);
    @Select("select grade,score,subject from growth_config where  convert(score,signed) >#{score} order by convert(score,signed) asc limit 1")
    GrowthConfig selectCurrentGrade(String score);
}

